package sm.pzavoli.inter;

import sm.pzavoli.lexer.Tag;
import sm.pzavoli.lexer.Token;
import sm.pzavoli.lexer.Word;
import sm.pzavoli.symbols.Type;

public class Function extends Expr {

	   public String lexeme = "";
	   public Expr expr = null;
	   public Token tok = null; 
	   
	   public Function(Word tok) {
		   super(tok,Type.Funct);
		   this.tok = tok; 
		   lexeme = tok.lexeme; 
	   }
	   public Function(Word tok, Expr e) {
		   super(tok,Type.Funct); 
		   lexeme = tok.lexeme;
		   expr = e;
	   }
	   /*public Function(String s, int tag) { super(tag); lexeme = s; }*/
	   public String toString() { return lexeme; }

	   public static final Word

	      sum = new Word( "sum", Tag.SUM ),  count = new Word( "count", Tag.COUNT ),
	      format  = new Word( "format", Tag.FORMAT  );
	   
}
